package com.sxf.dao;

import java.util.Date;
import java.util.List;
import java.util.Map;

import com.sxf.domain.blog.Post;
import com.sxf.domain.blog.PostMeta;
import com.sxf.domain.viewbean.PostVO;
import com.sxf.mybatis.page.Pagination;
import com.sxf.querybean.PostQuery;

public interface PostDAO {

	/**
	 * @param postQuery
	 * @param queryMode
	 *            查询模式(具体看Constan常量)
	 * @return
	 */
	public Pagination<PostVO> queryPage(PostQuery query);

	public PostVO queryOne(PostQuery query);

	public List<PostVO> queryList(PostQuery query);

	public long queryNumber(PostQuery query);

	/**
	 * 统计文章
	 * 
	 * @return
	 */
	public Map<String, Integer> queryStatistic();

	public int insert(Post info);

	public int update(Post info);

	public int delete(Post info);

	/**
	 * 日期归档
	 * 
	 * @return
	 */
	public List<Date> getArchivePost();

	/**
	 * 返回主键或影响的行数
	 * 
	 * @param PostMeta
	 * @return
	 */
	public long insertPostMeta(PostMeta info);

	public int updatePostMeta(PostMeta info);

	public int deletePostMeta(PostMeta info);
}
